package com.pd.ChainOfResponsibility;

/**
 * Created with IntelliJ IDEA.
 * User: 5
 * Date: 17-2-28
 * Time: 下午1:41
 * To change this template use File | Settings | File Templates.
 */
public class Handler2 extends DefaultHandler implements Handler {

    @Override
    public void doWork(int time) {
        if (time >= 5 && time < 10) {
            System.out.println("大于5 小于10");
        } else if (handler!=null){
            handler.doWork(time);
        }
    }
}
